{include file="header.html"}
<style type="text/css">
.goto_login {width: 100%;margin-top:8px;display: block;text-align: center;color:#444;height:45px;line-height:45px;font-size: 15px;border-radius: 4px;-webkit-border-radius: 4px;border: 1px #DADADA solid;background: -webkit-gradient(linear, center bottom, center top, from(#ffffff), to(#e5e5e5));}
</style>
<div class="conter">
  {include file="header.common.html"}

  <div class="form_box">
   <form id="register_form" method="post" >
    <dl>
     <dt>用户名</dt>
     <dd><input type="text" id="user_name" name="user_name" placeholder="请输入用户名/手机号/QQ号/邮箱" class="text_input"/><label id="checking_user" class="checking">检查中...</label></dd>
    </dl>     
    <dl>
     <dt>密&nbsp;&nbsp;&nbsp;&nbsp;码</dt>
     <dd><input type="password" id="password" name="password" placeholder="请输入您的密码" class="text_input"/></dd>
    </dl> 
    <dl>
     <dt>手机电话</dt>
     <dd><input type="text" id="phone_mob" name="phone_mob" placeholder="请输入您的手机/电话号码" class="text_input"/></dd>
    </dl>  
    <dl>
     <dt>电子邮箱</dt>
     <dd><input type="text" id="email" name="email" placeholder="请输入您的邮箱地址" class="text_input"/></dd>
    </dl>  
    <dl>
     <dt>QQ号码</dt>
     <dd><input type="text" id="im_qq" name="im_qq" class="text_input"/></dd>
    </dl>  
    <dl>
     <dt>所在区域</dt>
     <dd class="box_txt"><label><input name="idpic" type="radio" id="rbtnyes" value="rbtnyes" checked="checked" /> 中国</label>&nbsp;&nbsp;&nbsp;&nbsp;<label><input id="rbtnno" type="radio" name="idpic" value="rbtnno" /> 美国</label></dd>
    </dl>  
     <p><input type="Submit" class="button_css" value="注 册"><input type="hidden" name="ret_url" value="{$ret_url}" /></p>
   </form>
   <a class="goto_login" href="index.php?app=member&act=login&ret_url={$ret_url}">如果您已经注册，请直接登录</a>
  </div>
 <br /><br />
</div>  
<script type="text/javascript">
//注册表单验证
$(function(){
    $('#register_form').validate({
        errorPlacement: function(error, element){
			element.parent('dd').append(error);
        },
        onkeyup: false,
        rules : {
            user_name : {
                required : true,
                minlength: 2,maxlength: 25,
				checkName: true,
                remote   : {
                    url :'index.php?app=member&act=check_user&ajax=1',
                    type:'get',
                    data:{
                        user_name : function(){
                            return $('#user_name').val();
                        }
                    },
                    beforeSend:function(){
                        var _checking = $('#checking_user');
                        _checking.prev('.field_notice').hide();
                        _checking.next('label').hide();
                        $(_checking).show();
                    },
                    complete :function(){
                        $('#checking_user').hide();
                    }
                }
            },
            password : { required : true, minlength: 6 },
			phone_mob : { required : true, minlength: 6, checkTel : true},
			email : { required : true, email : true },
			im_qq : {  minlength: 5,maxlength: 11, digits : true}		
        },
        messages : {
            user_name : { required : '{$lang.user_name_required}',minlength: '{$lang.user_name_limit}',maxlength: '{$lang.user_name_limit}',checkName: '格式错误，仅支持汉字、字母、数字、"-"、"_"的组合',
			              remote: '您输入的用户名已存在，请换另一个' },
            password  : {required : '{$lang.password_required}', minlength: '{$lang.password_length_limit}'},
			phone_mob : { required : '{$lang.phone_mob_required}', minlength: '请输入正确的手机/电话号码，最小为6位数字', checkTel: "错误的格式，请输入中国地区正确的手机号码或者电话号码" },
			email : { required : '{$lang.email_required}', email : '{$lang.email_invalid}' },
			im_qq : { minlength: '请输入正确的QQ号，最小为5位数字', maxlength: '请输入正确的QQ号，最大为11位数字', digits : 'QQ号码必须为数字' }
        }
    });
});
</script>
</body>
</html>